/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.hardware.input.common;

/**
 * Motion event flags
 */
@VintfStability
@Backing(type="int")
enum Flag {
    /**
     * Indicates that the window that received this motion event is partly
     * or wholly obscured by another visible window above it. This flag is set to true
     * even if the event did not directly pass through the obscured area.
     * A security sensitive application can check this flag to identify situations in which
     * a malicious application may have covered up part of its content for the purpose
     * of misleading the user or hijacking touches. An appropriate response might be
     * to drop the suspect touches or to take additional precautions to confirm the user's
     * actual intent.
     */
    WINDOW_IS_OBSCURED = 1 << 0,
    /**
     * This flag indicates that the event has been generated by a gesture generator. It
     * could be used, for example, to determine whether touch slop should be applied.
     */
    IS_GENERATED_GESTURE = 1 << 3,
    /**
     * Motion event is inconsistent with previously sent motion events.
     */
    TAINTED = 1 << 31,
}
